package service_base

import (
	"strings"
	"wrblog-api-go/app/dao/dao_base"
	"wrblog-api-go/app/model/model_base"
)

func GetArticleGroupPageList(baseArticleGroup model_base.SelectBaseArticleGroup) ([]model_base.BaseArticleGroupVo, int64, error) {
	return dao_base.GetArticleGroupPageList(baseArticleGroup)
}

func GetArticleGroupInfo(groupId int) (baseArticleGroup model_base.BaseArticleGroupVo, err error) {
	return dao_base.GetArticleGroupInfo(groupId)
}

func AddArticleGroup(baseArticleGroup model_base.BaseArticleGroupPo) (int, error) {
	return dao_base.AddArticleGroup(baseArticleGroup)
}

func EditArticleGroup(baseArticleGroup model_base.BaseArticleGroupPo) (int64, error) {
	return dao_base.EditArticleGroup(baseArticleGroup)
}

// RemoveArticleGroup 逻辑删除
func RemoveArticleGroup(groupIds string, uk string) (int64, error) {
	return dao_base.RemoveArticleGroup(strings.Split(groupIds, ","), uk)
}
